import random
from collections import Counter

# 生成随机整数列表
random_numbers = [random.randint(0, 9) for _ in range(100)]

# 计算平均值
average = sum(random_numbers) / len(random_numbers)

# 统计每个数的出现次数
counts = Counter(random_numbers)

# 打印结果
print(f"生成的随机整数列表: {random_numbers}")
print(f"平均值: {average}")
print("每个数的出现次数:")
for number, count in counts.items():
    print(f"数字 {number}: {count}次")